package cn.waka.sys.admin.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;

@ControllerAdvice(basePackages="cn.waka.sys.admin.controller")
public class ControllerException  extends ResponseEntityExceptionHandler{
		@ExceptionHandler(Exception.class)
		@ResponseBody
		public String exception(Exception e){
			return e.getMessage();
		}
}
